package com.itxh.core.excutor;

import com.itxh.core.config.Configuration;
import com.itxh.core.config.MappedStatement;

import java.util.List;

// 实现二级缓存
public class CachingExecutor implements Executor{

    private Executor executor;
    public CachingExecutor(Executor executor) {
        this.executor = executor;
    }

    @Override
    public <T> List<T> query(MappedStatement mappedStatement, Configuration configuration, Object param) {
        //TODO 二级缓存暂时不去处理

        return executor.query(mappedStatement, configuration, param);
    }
}
